package com.charge.service.impl;

import com.charge.dao.UserIncomeTypeMapping;
import com.charge.domain.UserIncomeType;
import com.charge.service.IncomeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

/**
 * Description :
 * Author : 91658
 * Date : 2018/6/11 10:21
 **/
@Service
public class IncomeServiceImpl implements IncomeService {

    @Autowired
    private UserIncomeTypeMapping userIncomeTypeMapping;

    @Override
    public void insertIncome(UserIncomeType incomeType) {
        incomeType.setCreateTime(new Date());
        userIncomeTypeMapping.insertSelective(incomeType);
    }

    @Override
    public List<UserIncomeType> selectIncomeList(UserIncomeType userIncomeType) {
        return userIncomeTypeMapping.selectAllIncome(userIncomeType);
    }
}
